package pw.goyd.game.logic;

import pw.goyd.protocol.core.Serializer;

/**
 * 设置名字响应
 * Created by StanWind on 2016/11/3.
 */
public class SetNameResponse extends Serializer {
    private int state;  //  设置名字状态

    public int getState() {
        return state;
    }

    /**
     * 0 正常 1 重名 2 金币不足 3名字过长
     *
     * @param state
     */
    public void setState(int state) {
        this.state = state;
    }

    @Override
    protected void read() {

    }

    @Override
    protected void write() {
        writeByte((byte) state);
    }
}
